//用户相关接口
import http from '../utils/http'

//登录接口
export const reqLogin = (code) => {
  // return http.get(`/weixin/wxLogin/${code}`)
  //json模拟不带code请求
  return http.get(`/weixin/wxLogin`)
}
//获取用户信息接口
export const reqUserInfo = () => {
  return http.get(`/weixin/getuserInfo`)
}
/**
 * @description 实现本地资源上传
 * @param {*} filePath 要上传的文件资源路径
 * @param {*} name 文件对应的 key
 * @returns Promise
 */
export const reqUploadFile = (filePath, name) => {
  return http.upload('/fileUpload', filePath, name)
}
//修改用户接口
export const reqSetUserInfo = (userInfo) => {
  return http.put('/weixin/getuserInfo', {
    "code": 200,
    "message": "成功",
    "data": userInfo
  })
}